package Method;

/**
 * ClassName:MethodDemo8
 * Package:Method
 * Description:
 *
 * @Author:ZhangXin
 * @Create2023/1/12-0:58
 * @Version:v1.0
 */
public class MethodDemo8 {
    public static void main(String[] args) {
        double r = method(2.2,2.4);
        double s = method(2.5,1.3);
        if(r>s){
            System.out.println("r的面积最大,面积是："+r);
            System.out.println("s的面积最小,面积是："+s);
        }else{
            System.out.println("s的面积最大,面积是："+s);
            System.out.println("r的面积最小,面积是："+r);
        }
    }
    public static double method(double len,double wide){
        double area = len * wide;
        return area;
    }
}
